﻿#pragma once
#include <memory>
#include <optional>
#include "vulkan/vulkan.hpp"

class Context
{
public:
    static std::shared_ptr<Context> create();

//private:
    Context();
    ~Context();

private:
    void createInstance();
    void selectPhyiscalDevice();
    void createDevice();

    void queryQueueFamilyIndices();
    void getQueues();

private:
    struct QueueFamliyIndeices final
    {
        std::optional<uint32_t> graphicsQueue;
    };

    vk::Instance       m_instance;
    vk::PhysicalDevice m_phyDevice;
    vk::Device         m_device;
    vk::Queue          m_gpaphcisQueue;

    QueueFamliyIndeices m_queuefamliyIndices;
};
